package com.ailink.concurrent.thread.pool;

import java.util.concurrent.ThreadFactory;

public class ThreadFactoryTask implements ThreadFactory {

    public ThreadFactoryTask() {
    }

    @Override
    public Thread newThread(Runnable r) {
        Thread thread = new Thread(r);
        thread.setName("自定义线程名称");
        System.out.println("创建线程：" + thread.getName());
        return thread;
    }
}
